package com.zetyun.tiger.connector.cdc;


import com.fasterxml.jackson.annotation.JsonClassDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.zetyun.rt.meta.jsonschema.annotation.JsonSchemaFormat;
import com.zetyun.rt.meta.jsonschema.annotation.JsonSchemaTitle;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;
import java.util.Set;

@Getter
@Setter
@ToString
@JsonClassDescription("format 函数参数类")
public class FormatAsMaxwellDataParameter {

    @JsonSchemaTitle("master名称")
    @JsonProperty(defaultValue = "redis-master")
    private String masterName;

    @JsonSchemaTitle("sentinel地址")
    @JsonProperty(defaultValue = "rdx1:26379")
    private Set<String> sentinels;

    @JsonSchemaTitle("密码")
    @JsonSchemaFormat(value = JsonSchemaFormat.PASSWORD)
    @JsonProperty(defaultValue = "Redis26379")
    private String password;

    @JsonSchemaTitle("缓存集合名称前缀")
    private String additionalKey;

    @JsonSchemaTitle("操作标识字段")
    @JsonProperty(defaultValue = "op_")
    private String opType;

    @JsonSchemaTitle("key字段")
    private List<String> keyNames;

    @JsonSchemaTitle("特定格式的日期字段名称")
    private String dateField;

    @JsonSchemaTitle("数据过期小时数")
    @JsonProperty(defaultValue = "1")
    private Integer expireTime;

    @JsonSchemaTitle("主题分隔符")
    private String topicSeparator;


    @JsonSchemaTitle("数据库名称位置索引")
    private Integer dbIndex;


    @JsonSchemaTitle("表名位置索引")
    private Integer tbIndex;


}
